﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {name: '登录', path: '/user/login', component: './User/Login'},
      {name: '注册', path: '/user/register', component: './User/Register'},
    ],
  },
  {path: '/', redirect: '/upload'}, //首页定向到文件处理服务页面
  {path: '/upload', name: '文件处理服务', icon: 'file', component: './FileHandling'},
  {path: '/index', name: 'API信息', icon: 'api', component: './Index'},
  {path: '/api_info/:id', name: '接口信息', icon: 'info', component: './ApiInfo', hideInMenu: true},
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      {name: 'API', icon: 'api', path: '/admin/api_info', component: './Admin/Api'},
      {name: '服务记录', icon: 'table', path: '/admin/record_list', component: './Admin/RecordList'},
      // {name: 'API调用次数统计', icon: 'PieChartOutlined', path: '/admin/api_analysis', component: './Admin/ApiAnalysis'},
    ],
  },
  {name: '服务记录', icon: 'table', path: '/record_list', component: './RecordList'},
  {name: '数据结构', icon: 'database', path: '/structure_list', component: './DataStructure'},
  {name: 'API调用次数统计', icon: 'PieChartOutlined', path: '/api_analysis', component: './Admin/ApiAnalysis'},
  // { path: '/', redirect: '/welcome' },
  {path: '*', layout: false, component: './404'},
];
